<template>
    <div>
        <div>{{ obj.name }}</div>
        <div>{{ obj.age }}</div>
        <button @click="handleClick">点我变化</button>
    </div>
</template>
<script>
import { reactive } from 'vue';

export default {
    setup() {
        const obj = reactive({
            name: "小米",
            age: 18
        })

        const handleClick = () => {
            obj.name = "彭于晏"
            obj.age = "28"
        }

        return {
            obj,
            handleClick
        }
    },
}
</script>